Harmonic number

The term harmonic number has multiple meanings. For other meanings, see harmonic number (disambiguation).

In mathematics, the n-th harmonic number is the sum of the reciprocals of the first n natural numbers:

H_n= 1%2B\frac{1}{2}%2B\frac{1}{3}%2B\cdots%2B\frac{1}{n}
=\sum_{k=1}^n \frac{1}{k}.

This also equals n times the inverse of the harmonic mean of these natural numbers.

Harmonic numbers were studied in antiquity and are important in various branches of number theory. They are sometimes loosely termed harmonic series, are closely related to the Riemann zeta function, and appear in various expressions for various special functions.

When the value of a large quantity of items has a Zipf's law distribution, the total value of the n most-valuable items is the n-th harmonic number. This leads to a variety of surprising conclusions in the Long Tail and the theory of network value.

Contents

Calculation

An integral representation is given by Euler:

 H_n = \int_0^1 \frac{\,\,\, 1 - x^n}{1 - x}\,dx.

The equality above is obvious by the simple algebraic identity below

\quad\frac{\,\,\, 1-x^n}{1-x}=1%2Bx%2B\cdots %2Bx^{n-1}

An elegant combinatorial expression can be obtained for \,H_nusing the simple integral transform \,x=1-u:

 H_n = \int_0^1 \frac{\,\,\, 1 - x^n}{1 - x}\,dx=-\int_1^0\frac{1-(1-u)^n}{u}\,du=\int_0^1\frac{1-(1-u)^n}{u}\,du=\int_0^1\left[\sum_{k=1}^n(-1)^{k-1}\binom nk u^{k-1}\right]\,du=
 =\sum_{k=1}^n (-1)^{k-1}\binom nk \int_0^1u^{k-1}\,du=\sum_{k=1}^n(-1)^{k-1}\frac{1}{k}\binom nk

The same representation can be produced by using the third Retkes identity putting x_1=1,\ldots,x_n=n and using the fact that \Pi_k(1,\ldots,n)=(-1)^{n-k}(k-1)!(n-k)!.

H_n=H_{n,1}=\sum_{k=1}^n\frac{1}{k}=(-1)^{n-1}n!\sum_{k=1}^n\frac{1}{k^2\Pi_k(1,\ldots,n)}=\sum_{k=1}^n(-1)^{k-1}\frac{1}{k}\binom nk

If we use Retkes identity for x_1=1^2,\ldots,x_n=n^2 in which case \Pi_k(1^2,2^2,\ldots,n^2)=(-1)^{n-k}\frac{(n-k)!(n%2Bk)!}{2k^2} one can have an analog formula for the n-th partial sum of \,\zeta(2)

H_{n,2}=\sum_{k=1}^n\frac{1}{k^2}=2\sum_{k=1}^n(-1)^{k-1}\frac{1}{k^2}\frac{\binom nk}{\binom {n%2Bk} k}

Hn grows about as fast as the natural logarithm of n. The reason is that the sum is approximated by the integral

\int_1^n {1 \over x}\, dx

whose value is ln(n).

The values of the sequence Hn - ln(n) decrease monotonically towards the limit:

 \lim_{n \to \infty} \left(H_n - \ln n\right) = \gamma

(where γ is the Euler–Mascheroni constant 0.5772156649...), and the corresponding asymptotic expansion as n\rightarrow\infty:

H_n \sim \ln{n}%2B\gamma%2B\frac{1}{2n}-\sum_{k=1}^\infty \frac{B_{2k}}{2k n^{2k}}=\ln{n}%2B\gamma%2B\frac{1}{2n}-\frac{1}{12n^2}%2B\frac{1}{120n^4}-\cdots

where B_k are the Bernoulli numbers.

Special values for fractional arguments

There are the following special analytic values for fractional arguments between 0 and 1, given by the integral

H_\alpha = \int_0^1\frac{1-x^\alpha}{1-x}\,dx

More may be generated from the recurrence relation  H_\alpha = H_{\alpha-1}%2B\frac{1}{\alpha} or from the reflection relation  H_{1-\alpha}-H_\alpha = \pi\cot{(\pi\alpha)}-\frac{1}{\alpha}%2B\frac{1}{1-\alpha}.

For every x>0, integer or not, we have:  H_{x} =  x \sum_{k=1}^\infty \frac{1}{k(x%2Bk)}

 H_{3/4} = \frac{4}{3}-3\ln{2}%2B\frac{\pi}{2}  \,
 H_{2/3} = \frac{3}{2}(1-\ln{3})%2B\sqrt{3}\frac{\pi}{6}  \,
 H_{1/2} = 2 -2\ln{2} \,
 H_{1/3} = 3-\frac{\pi}{2\sqrt{3}} -\frac{3}{2}\ln{3}
 H_{1/4} = 4-\frac{\pi}{2} - 3\ln{2}
 H_{1/6} = 6-\frac{\pi}{2}\sqrt{3} -2\ln{2} -\frac{3}{2}\ln{3}
 H_{1/8} = 8-\frac{\pi}{2} - 4\ln{2} - \frac{1}{\sqrt{2}} \left\{\pi %2B \ln\left(2 %2B \sqrt{2}\right) - \ln\left(2 - \sqrt{2}\right)\right\}
 H_{1/12} = 12-3\left(\ln{2}%2B\frac{\ln{3}}{2}\right)-\pi\left(1%2B\frac{\sqrt{3}}{2}\right)%2B2\sqrt{3}\ln{\sqrt{2-\sqrt{3}}}

Based on  H_{x} =  x \sum_{k=1}^\infty \frac{1}{k(x%2Bk)} , we have:  \int_0^1H_{x}\,dx = \gamma, where \gamma is the Euler–Mascheroni constant or, more generally, for every n we have:  \int_0^nH_{x}\,dx = n\gamma%2B\ln{(n!)}

Generating functions

A generating function for the harmonic numbers is

\sum_{n=1}^\infty z^n H_n = 
\frac {-\ln(1-z)}{1-z},

where \ln(z) is the natural logarithm. An exponential generating function is

\sum_{n=1}^\infty \frac {z^n}{n!} H_n =
 -e^z \sum_{k=1}^\infty \frac{1}{k} \frac {(-z)^k}{k!} = 
e^z \mbox {Ein}(z)

where \mbox{Ein}(z) is the entire exponential integral. Note that

\mbox {Ein}(z) = \mbox{E}_1(z) %2B \gamma %2B \ln z = 
\Gamma (0,z) %2B \gamma %2B \ln z\,

where \Gamma (0,z) is the incomplete gamma function.

Applications

The harmonic numbers appear in several calculation formulas, such as the digamma function:

 \psi(n) = H_{n-1} - \gamma.\,

This relation is also frequently used to define the extension of the harmonic numbers to non-integer n. The harmonic numbers are also frequently used to define γ, using the limit introduced in the previous section, although

 \gamma = \lim_{n \rightarrow \infty}{\left(H_n - \ln\left(n%2B{1 \over 2}\right)\right)}

converges more quickly.

In 2002 Jeffrey Lagarias proved that the Riemann hypothesis is equivalent to the statement that

 \sigma(n) \le H_n %2B \ln(H_n)e^{H_n},

is true for every integer n ≥ 1 with strict inequality if n > 1; here σ(n) denotes the sum of the divisors of n.

The eigenvalues of the nonlocal problem

 \lambda \phi(x) = \int_{-1}^{1} \frac{\phi(x)-\phi(y)}{|x-y|} dy

are given by \lambda = 2H_n, where by convention, H_0 = 0.

Generalization

Generalized harmonic numbers

The generalized harmonic number of order n of m is given by

H_{n,m}=\sum_{k=1}^n \frac{1}{k^m}.

Note that the limit as n tends to infinity exists if m > 1.

Other notations occasionally used include

H_{n,m}= H_n^{(m)} = H_m(n).

The special case of m=1 is simply called a harmonic number and is frequently written without the superscript, as

H_n= \sum_{k=1}^n \frac{1}{k}.

In the limit of n\rightarrow \infty, the generalized harmonic number converges to the Riemann zeta function

\lim_{n\rightarrow \infty} H_{n,m} = \zeta(m).

The related sum \sum_{k=1}^n k^m occurs in the study of Bernoulli numbers; the harmonic numbers also appear in the study of Stirling numbers.

Some integrals of generalized harmonic are: \int_0^a H_{x,2} \, dx = a \frac {\pi^2}{6}-H_{a}

and \int_0^a H_{x,3} \, dx = a A - \frac {1}{2} H_{a,2} where A is the Apéry's constant.

A generating function for the generalized harmonic numbers is

\sum_{n=1}^\infty z^n H_{n,m} = \frac {\mathrm{Li}_m(z)}{1-z},

where \mathrm{Li}_m(z) is the polylogarithm, and |z| < 1. The generating function given above for m = 1 is a special case of this formula.

Multiplication formulas

Using polygamma functions we obtain:

H_{2x}=\frac{1}{2}\left(H_{x}%2BH_{x-\frac{1}{2}}\right)%2B\ln{2}
H_{3x}=\frac{1}{3}\left(H_{x}%2BH_{x-\frac{1}{3}}%2BH_{x-\frac{2}{3}}\right)%2B\ln{3}

or, more generally:

H_{nx}=\frac{1}{n}\left(H_{x}%2BH_{x-\frac{1}{n}}%2BH_{x-\frac{2}{n}}%2B\cdots %2BH_{x-\frac{n-1}{n}}\right)%2B\ln{n}

where \ln{n} is the natural logarithm.

For generalized harmonic numbers we have:

H_{2x,2}=\frac{1}{2}\left(\zeta(2)%2B\left(H_{x,2}%2BH_{x-\frac{1}{2},2}\right)\right)
H_{3x,2}=\frac{1}{9}\left(6\zeta(2)%2BH_{x,2}%2BH_{x-\frac{1}{3},2}%2BH_{x-\frac{2}{3},2}\right)

where \zeta(n) is the Riemann zeta function.

Generalization to the complex plane

Euler's integral formula for the harmonic numbers follows from the integral identity

\int_a^1 \frac {1-x^s}{1-x} \, dx = 
- \sum_{k=1}^\infty \frac {1}{k} {s \choose k} (a-1)^k

which holds for general complex-valued s, for the suitably extended binomial coefficients. By choosing a=0, this formula gives both an integral and a series representation for a function that interpolates the harmonic numbers and extends a definition to the complex plane. This integral relation is easily derived by manipulating the Newton series

\sum_{k=0}^\infty {s \choose k} (-x)^k = (1-x)^s,

which is just the Newton's generalized binomial theorem. The interpolating function is in fact the digamma function:

\psi(s%2B1)%2B\gamma = \int_0^1 \frac {1-x^s}{1-x} \, dx

where \psi(x) is the digamma, and \gamma is the Euler-Mascheroni constant. The integration process may be repeated to obtain

H_{s,2}=-\sum_{k=1}^\infty \frac {(-1)^k}{k} {s \choose k} H_k.

Relation to the Riemann zeta function

Some derivatives of fractional harmonic numbers are given by:

\frac{d^n H_x}{dx^n} = (-1)^{n%2B1}n!\left[\zeta(n%2B1)-H_{x,n%2B1}\right]
\frac{d^n H_{x,2}}{dx^n} = (-1)^{n%2B1}(n%2B1)!\left[\zeta(n%2B2)-H_{x,n%2B2}\right]
\frac{d^n H_{x,3}}{dx^n} = (-1)^{n%2B1}\frac{1}{2}(n%2B2)!\left[\zeta(n%2B3)-H_{x,n%2B3}\right]

And using Maclaurin series, we have for x<1 :

H_x = \sum_{n=1}^{\infin}(-1)^{n%2B1}x^n\zeta(n%2B1)
H_{x,2} = \sum_{n=1}^{\infin}(-1)^{n%2B1}(n%2B1)x^n\zeta(n%2B2)
H_{x,3} = \frac{1}{2}\sum_{n=1}^{\infin}(-1)^{n%2B1}(n%2B1)(n%2B2)x^n\zeta(n%2B3)

where \zeta(n) is the Riemann zeta function.

See also

References

This article incorporates material from Harmonic number on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.